﻿#ifndef DEX_DEF_H
#define DEX_DEF_H

#include "DexTeachSDK_global.h"
#include <functional>
#include <system_error>

using namespace std;

enum NetworkStatus
{
    Connected,
    Disconnected,
    Connecting,
    ConnectFailed
};

///网络连接状态回调
using NetworkStatusCallback = std::function<void(NetworkStatus networkStatus, int32_t code, const char* error)>;
///获取用户坐标系名称回调
using UserCoordinateNameCallback = std::function<void(const char* name)>;
///获取当前速度回调
using CurrentSpeedChangedCallback = std::function<void(int speedIndex, double speedValue)>;
///获取伺服状态回调 status:0 未使能，1使能
using ServoStatusChangedCallback = std::function<void(int status)>;
///获取关节信息回调
using JointInfoChangedCallback = std::function<void(double jointAngle[6], double terminalPosInBase[6], double terminalPosInUser[6])>;
///读取I/O信号状态回调
using IoSignalStatusChangedCallback = std::function<void(int input, int output)>;
///机器人程序运行状态回调 status:0 停止，1运行
using ProgramStatusChangedCallback = std::function<void(int status)>;
///程序行号回调
using ProgrameLineNumChangedCallback = std::function<void(int func, int line)>;
///获取点位数据-JOINT、TERMINAL
using VarValueChangedCallback = std::function<void(const char *varType, const char *varName,
                                        double x, double y, double z, double a, double b, double c)>;
///获取点位数据-INT
using VarValueForIntChangedCallback = std::function<void(const char *varName, int value)>;
///获取点位数据-DOUBLE
using VarValueForDoubleChangedCallback = std::function<void(const char *varName, double value)>;
///获取报警信息
using WarningMessageChangedCallback = std::function<void(const char *msg)>;
///获取手系回调
using HandSystemChangedCallback = std::function<void(int handType)>;
///获取相机套件信息回调 index:方案索引,running:方案运行状态
using CameraInfoCallback = std::function<void(int index, int running)>;
///获取示教器与控制器连接状态回调 0 未连接，1 已连接
using ControllerConnectStatusCallback = std::function<void(int connect)>;
///获取当前打开的程序名回调
using CurrentProgramNameCallback = std::function<void(const char *programName)>;
///获取当前操作模式回调 0 示教模式 1 再现模式
using CurrentOperatorModelCallback = std::function<void(int operatorModel)>;

#endif // DEX_DEF_H
